//
//  LoginView.m
//  UI_豆瓣项目
//
//  Created by dllo on 15/10/31.
//  Copyright (c) 2015年 关业达. All rights reserved.
//

#import "LoginView.h"

@implementation LoginView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self xiangqing];
    }
    return self;
}

- (void)xiangqing
{
    self.userName = [[UILabel alloc] initWithFrame:CGRectMake(50, 160, 60, 30)];
    self.userName.text = @"用户名:";
    [self addSubview:self.userName];
    [_userName release];
    
    self.code = [[UILabel alloc] initWithFrame:CGRectMake(50, 230, 60, 30)];
    self.code.text = @"密码:";
    [self addSubview:self.code];
    [_code release];
    
    self.userTextField = [[UITextField alloc] initWithFrame:CGRectMake(135, 160, 150, 30)];
    self.userTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.userTextField.placeholder = @"请输入用户名";
    self.userTextField.clearButtonMode = YES;
    [self addSubview:self.userTextField];
    [_userTextField release];
    
    
    self.codeTextField = [[UITextField alloc] initWithFrame:CGRectMake(135, 230, 150, 30)];
    self.codeTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.codeTextField.placeholder = @"请输入密码";
    self.codeTextField.clearButtonMode = YES;
    self.codeTextField.secureTextEntry = YES;
    [self addSubview:self.codeTextField];
    [_codeTextField release];
    
    self.longinButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.longinButton.frame = CGRectMake(50, 300, 120, 50);
    self.longinButton.backgroundColor = [UIColor colorWithRed:0.662 green:1.000 blue:0.096 alpha:1.000];
    [self.longinButton setTitle:@"登陆" forState:UIControlStateNormal];
    [self addSubview:self.longinButton];
    
    self.zhuceButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.zhuceButton.frame = CGRectMake(210, 300, 120, 50);
    self.zhuceButton.backgroundColor = [UIColor colorWithRed:1.000 green:0.643 blue:0.052 alpha:1.000];
    [self.zhuceButton setTitle:@"注册" forState:UIControlStateNormal];
    [self addSubview:self.zhuceButton];
    
    
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
